package cn.sxt.yxl.users.pojo;

import java.io.Serializable;
import java.util.Date;
import java.util.Iterator;

public class AAdmin implements Serializable{

	private int id;
	private int roleId;
	private String email;
	private String password;
	private String trueName;
	private String photoPath;
	private String phone;
	private String qq;
	private byte status;
	private Date createTime;
	private Date updateTime;
	private Date lastLoginTime;
	
	
	public int getRoleId() {
		return roleId;
	}

	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}

	public String getPhotoPath() {
		return photoPath;
	}

	public void setPhotoPath(String photoPath) {
		this.photoPath = photoPath;
	}

	/* 增加字符串描述 */
	private String statusStr;
	
	public String getStatusStr() {
//		if(status == 0){
//			statusStr = "禁用";
//		}else{
//			statusStr = "启用";
//		}
		AdminEnum[] adminEnums = AdminEnum.values();
		for (int i = 0; i < adminEnums.length; i++) {
			AdminEnum adminEnum = adminEnums[i];
			if(adminEnum.toString().startsWith("STATUS_")&&adminEnum.getStatus()==this.status){
				statusStr = adminEnum.getName();
			}
			
		}
		return statusStr;
	}

	/* 配置关联关系 */
	private ARole role;
	
	
	public ARole getRole() {
		return role;
	}

	public void setRole(ARole role) {
		this.role = role;
	}


	public int getId()
	{
		return id;
	}

	public void setId(int id)
	{
		this.id = id;
	}


	public String getEmail()
	{
		return email;
	}

	public void setEmail(String email)
	{
		this.email = email;
	}

	public String getPassword()
	{
		return password;
	}

	public void setPassword(String password)
	{
		this.password = password;
	}

	public String getTrueName()
	{
		return trueName;
	}

	public void setTrueName(String trueName)
	{
		this.trueName = trueName;
	}

	public String getPhone()
	{
		return phone;
	}

	public void setPhone(String phone)
	{
		this.phone = phone;
	}

	public String getQq()
	{
		return qq;
	}

	public void setQq(String qq)
	{
		this.qq = qq;
	}

	public byte getStatus()
	{
		return status;
	}

	public void setStatus(byte status)
	{
		this.status = status;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Date getLastLoginTime()
	{
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime)
	{
		this.lastLoginTime = lastLoginTime;
	}
}
